<?php

$listType = $_POST["type"] ? $_POST["type"] : 0;
$arr = [];
if ($listType == 0) {
    $arr = array(
        array('id' => 1, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '装修/设计01', 'discount' => '满20000减500'),
        array('id' => 2, 'logo' => 'https://wnworld.com/uploads/jjd/03.jpg', 'name' => '装修/设计02', 'discount' => '满1000减500'),
        array('id' => 3, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '装修/设计03', 'discount' => ''),
        array('id' => 4, 'logo' => 'https://wnworld.com/uploads/jjd/03.jpg', 'name' => '装修/设计04', 'discount' => ''),
        array('id' => 5, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '装修/设计05', 'discount' => '满20000减500'),
        array('id' => 6, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '装修/设计06', 'discount' => ''),
        array('id' => 7, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '装修/设计07', 'discount' => '满20000减500'),
        array('id' => 8, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '装修/设计08', 'discount' => '满20000减500'),
        array('id' => 9, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '装修/设计09', 'discount' => '满20000减500'),
        array('id' => 10, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '装修/设计10', 'discount' => '满20000减500'),
    );

} else {
    $arr = array(
        array('id' => 1, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '建材/软装01', 'discount' => '满20000减500'),
        array('id' => 2, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '建材/软装02', 'discount' => '满1000减500'),
        array('id' => 3, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '建材/软装03', 'discount' => '满15000减500'),
        array('id' => 4, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '建材/软装04', 'discount' => '满2000减500'),
        array('id' => 5, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '建材/软装05', 'discount' => '满20000减500'),
        array('id' => 6, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '建材/软装06', 'discount' => '满20000减500'),
        array('id' => 7, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '建材/软装07', 'discount' => '满20000减500'),
        array('id' => 8, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '建材/软装08', 'discount' => '满20000减500'),
        array('id' => 9, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '建材/软装09', 'discount' => '满20000减500'),
        array('id' => 10, 'logo' => 'https://wnworld.com/uploads/jjd/01.jpg', 'name' => '建材/软装10', 'discount' => '满20000减500'),
    );
}
;

$stepNum = mt_rand(-1, 6);
$stepNum = 5;
if ($stepNum == -1) {
    $arr = array(
        'data' => array(
            'need_house' => false,
            'account' => "",
            'cs_tel' => "18559160494",
            'stepd' => -1, //当前步骤 -1未登录 0未申请 1额度审批 2贷款申请 3合同签署 4放款审核 5贷款发放 6贷款完成
            'bizs' => $arr,
        ),

        'status' => 1,
        'msg' => '',
        'redict' => '',
    );

} elseif ($stepNum == 0) {
    $arr = array(

        'data' => array(
            'cs_tel' => "18559160494",
            'account' => "",
            'need_house' => false,
            'stepd' => 0, //当前步骤 -1未登录 0未申请 1额度审批 2贷款申请 3合同签署 4放款审核 5贷款发放 6贷款完成
            'bizs' => $arr,
        ),

        'status' => 1,
        'msg' => '',
        'redict' => '',
    );

} elseif ($stepNum == 1) {
    $arr = array(
        'data' => array(
            'cs_tel' => "18559160494",
            'account' => "",
            'need_house' => false,
            'stepd' => 1, //当前步骤 -1未登录 0未申请 1额度审批 2贷款申请 3合同签署 4放款审核 5贷款发放 6贷款完成
            'loan' => array( //贷款流程
                'list' => array(
                    // array('step' => 1, 'time' => '08-19 13:12', 'status' => 0, 'remark' => ''), //status 0-进行中，1-完成，2-不通过
                    // array('step' => 1, 'time' => '08-19 13:12', 'status' => 1, 'remark' => '预授信额度:80000'), //status 0-进行中，1-完成，2-不通过
                    array('step' => 1, 'time' => '08-19 13:12', 'status' => 2, 'remark' => '请拨打客服电话了解情况'), //status 0-进行中，1-完成，2-不通过
                ),
            ),

            'bizs' => $arr,
        ),
        'status' => 1,
        'msg' => '',
        'redict' => '',
    );
} elseif ($stepNum == 2) {
    $arr = array(
        'data' => array(
            'cs_tel' => "18559160494",
            'need_house' => false,

            'stepd' => 2, //当前步骤 -1未登录 0未申请 1额度审批 2贷款申请 3合同签署 4放款审核 5贷款发放 6贷款完成
            'loan' => array( //贷款流程
                'list' => array(
                    array('step' => 1, 'time' => '08-19 13:12', 'status' => 1, 'remark' => '预授信额度:80000'), //status 0-进行中，1-完成，2-不通过
                    array('step' => 2, 'time' => '', 'status' => 0, 'remark' => '请耐心等待客服联系'), //status 0-进行中，1-完成，2-不通过
                    // array('step' => 2, 'time' => '08-20 14:12', 'status' => 1, 'remark' => '房屋面积：87.3m²'), //status 0-进行中，1-完成，2-不通过
                    // array('step' => 2, 'time' => '08-20 14:12', 'status' => 2, 'remark' => '原因:业主暂不贷款'), //status 0-进行中，1-完成，2-不通过

                ),
            ),
            'account' => array( //贷款完成后账户额度
                'left_money' => '150,000.00',
                'use_money' => '50,000.00',
                'money' => '200,000.00',
            ),
            'bizs' => $arr,
        ),
        'status' => 1,
        'msg' => '',
        'redict' => '',
    );

} elseif ($stepNum == 3) {
    $arr = array(
        'data' => array(
            'cs_tel' => "18559160494",
            'need_house' => false,

            'stepd' => 3, //当前步骤 -1未登录 0未申请 1额度审批 2贷款申请 3合同签署 4放款审核 5贷款发放 6贷款完成
            'loan' => array( //贷款流程
                'list' => array(
                    array('step' => 1, 'time' => '08-19 13:12', 'status' => 1, 'remark' => '预授信额度:80000'), //status 0-进行中，1-完成，2-不通过
                    array('step' => 2, 'time' => '08-20 14:12', 'status' => 1, 'remark' => '房屋面积：87.3m²'), //status 0-进行中，1-完成，2-不通过
                    array('step' => 3, 'time' => '', 'status' => 0, 'remark' => ''), //status 0-进行中，1-完成，2-不通过
                    // array('step' => 3, 'time' => '08-22 14:12', 'status' => 1, 'remark' => '真是贷款额度：¥80000'), //status 0-进行中，1-完成，2-不通过
                    // array('step' => 3, 'time' => '08-22 14:12', 'status' => 2, 'remark' => '原因:这个由客服填写'), //status 0-进行中，1-完成，2-不通过

                ),
            ),
            'account' => array( //贷款完成后账户额度
                'left_money' => '150,000.00',
                'use_money' => '50,000.00',
                'money' => '200,000.00',
            ),
            'bizs' => $arr,
        ),
        'status' => 1,
        'msg' => '',
        'redict' => '',
    );

} elseif ($stepNum == 4) {
    $arr = array(
        'data' => array(
            'cs_tel' => "18559160494",
            'need_house' => false,
            'stepd' => 4, //当前步骤 -1未登录 0未申请 1额度审批 2贷款申请 3合同签署 4放款审核 5贷款发放 6贷款完成
            'loan' => array( //贷款流程
                'list' => array(
                    array('step' => 1, 'time' => '08-19 13:12', 'status' => 1, 'remark' => '预授信额度:80000'), //status 0-进行中，1-完成，2-不通过
                    array('step' => 2, 'time' => '08-20 14:12', 'status' => 1, 'remark' => '房屋面积：87.3m²'), //status 0-进行中，1-完成，2-不通过
                    array('step' => 3, 'time' => '08-21 15:12', 'status' => 1, 'remark' => '真实贷款额度：￥7000', 'contract' => 'https://m4.xiaoyu.com/data/sign/yinhang0002.pdf'), //status 0-进行中，1-完成，2-不通过
                    // array('step' => 4, 'time' => '', 'status' => 0, 'remark' => ''), //status 0-进行中，1-完成，2-不通过
                    array('step' => 4, 'time' => '08-22 16:12', 'status' => 1, 'remark' => ''), //status 0-进行中，1-完成，2-不通过
                    // array('step' => 4, 'time' => '08-22 16:12', 'status' => 2, 'remark' => ''), //status 0-进行中，1-完成，2-不通过

                ),
            ),
            'account' => array( //贷款完成后账户额度
                'left_money' => '150,000.00',
                'use_money' => '50,000.00',
                'money' => '200,000.00',
            ),
            'bizs' => $arr,
        ),
        'status' => 1,
        'msg' => '',
        'redict' => '',
    );

} elseif ($stepNum == 5) {
    $arr = array(
        'data' => array(
            'cs_tel' => "18559160494",
            'need_house' => false,
            'stepd' => 5, //当前步骤 -1未登录 0未申请 1额度审批 2贷款申请 3合同签署 4放款审核 5贷款发放 6贷款完成
            'loan' => array( //贷款流程
                'list' => array(
                    array('step' => 1, 'time' => '08-19 13:12', 'status' => 1, 'remark' => '预授信额度:80000'), //status 0-进行中，1-完成，2-不通过
                    array('step' => 2, 'time' => '08-20 14:12', 'status' => 1, 'remark' => '房屋面积：87.3m²'), //status 0-进行中，1-完成，2-不通过
                    array('step' => 3, 'time' => '08-21 15:12', 'status' => 1, 'remark' => '真实贷款额度：￥7000'), //status 0-进行中，1-完成，2-不通过
                    array('step' => 4, 'time' => '08-22 16:12', 'status' => 1, 'remark' => '', 'contract' => 'https://m4.xiaoyu.com/data/sign/yinhang0002.pdf'), //status 0-进行中，1-完成，2-不通过
                    array('step' => 5, 'time' => '', 'status' => 0, 'remark' => '请自行使用农行掌银APP进行放款操作'), //status 0-进行中，1-完成，2-不通过
                    // array('step' => 5, 'time' => '08-23 17:12', 'status' => 1, 'remark' => ''), //status 0-进行中，1-完成，2-不通过
                    // array('step' => 5, 'time' => '08-23 17:12', 'status' => 2, 'remark' => '原因:这个由客服填写'), //status 0-进行中，1-完成，2-不通过
                ),
            ),
            'account' => array( //贷款完成后账户额度
                'left_money' => '150,000.00',
                'use_money' => '50,000.00',
                'money' => '200,000.00',
            ),
            'bizs' => $arr,
        ),
        'status' => 1,
        'msg' => '',
        'redict' => '',
    );

} elseif ($stepNum == 6) {

    $arr = array(
        'data' => array(
            'cs_tel' => "18559160494",
            'need_house' => 1, //mt_rand(0,1)
            'stepd' => 6, //当前步骤 -1未登录 0未申请 1额度审批 2贷款申请 3合同签署 4放款审核 5贷款发放 6贷款完成
            'loan' => array( //贷款流程
                'list' => array(
                    array('step' => 1, 'time' => '08-19 13:12', 'status' => 1, 'remark' => '预授信额度:80000'), //status 0-进行中，1-完成，2-不通过
                    array('step' => 2, 'time' => '08-20 14:12', 'status' => 1, 'remark' => '房屋面积：87.3m²'), //status 0-进行中，1-完成，2-不通过
                    array('step' => 3, 'time' => '08-21 15:12', 'status' => 1, 'remark' => '真实贷款额度：￥7000'), //status 0-进行中，1-完成，2-不通过
                    array('step' => 4, 'time' => '08-22 16:12', 'status' => 1, 'remark' => ''), //status 0-进行中，1-完成，2-不通过
                    array('step' => 5, 'time' => '08-23 17:12', 'status' => 0, 'remark' => ''), //status 0-进行中，1-完成，2-不通过
                ),
            ),
            'account' => array( //贷款完成后账户额度
                'left_money' => '150,000.00',
                'use_money' => '50,000.00',
                'money' => '200,000.00',
            ),
            'bizs' => $arr,
        ),
        'status' => 1,
        'msg' => '',
        'redict' => '',
    );
}

echo json_encode($arr);

?>